#include "contactabstractcontact.h"
#include "account/accountuser.h"

#include "QDebug"


namespace Contact {

AbstractContact::AbstractContact(QObject *parent)
    : QObject(parent)    
    , m_unreadMessage(0)
{

}


void AbstractContact::setUnreadMessage(int count)
{
    if (m_unreadMessage == count)
        return;

    m_unreadMessage = count;
    emit unreadMessageChanged(this);
    emit dataChanged(this);
}


int AbstractContact::unreadMessage() const
{
    return m_unreadMessage;
}

void AbstractContact::increaseUnreadMessage(int increment)
{
    m_unreadMessage += increment;
    emit unreadMessageChanged(this);
    emit dataChanged(this);
}


} // namespace Contact
